﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLLFactory;
using DataMode;
using IBLL;
using System.Data;
using System.Text;

namespace Face.Web.VideoPage
{
    public partial class VideoInfoModify : System.Web.UI.Page
    {

        private static IBLL.IVideo bll = BLLFactory.DataAccess.GetVideo();

        DataModeDataContext ctx = new DataModeDataContext();

        video newvideo = new video();

        protected void Page_Load(object sender, EventArgs e)
        {
            newvideo.video_id = 3;

            newvideo = bll.findVideo(newvideo.video_id);

            Label1.Text = newvideo.video_name;
            Label2.Text = newvideo.video_description;
        }

        protected void Button_Sumbition(object sender, EventArgs e)
        {

            newvideo.video_description = videoDescription.Text;
            newvideo.video_name = videoName.Text;

            Label1.Text = newvideo.video_name;
            Label2.Text = newvideo.video_description;
            videoDescription.Text = "";
            videoName.Text="";

            bll.updateVideo(newvideo);


        }

        protected void btn_logout(object sender, EventArgs e)
        {
            Session.Remove("user");
            Response.Redirect("/login_and_signup/login.aspx");
        }
    }
}